OOP

Comp 345

Assignment 1

Due Date: 1/13/2005

 

Problem Statement:

Each semester I have to update my online course calendars to start on different dates.  This is a tedious time consuming process that I would like to avoid. 

 

Your goal is:

To modify an existing .htm calendar file to contain valid dates form a given starting date. 

 

Details:

TT calendars will remain so.

MWF calendars will remain so.

Ask the user for the new first date of the first week of class. Format (MMM D or MMM DD)

Ask the user if it is a leap year.

 

All files that represent TT calendars will have “TT” at the end of their name.

All files that represent MWF calendars will have a “MWF” at the end of their name.

 

Every month in the file will be represented by its 3 character abbreviation.

The number of the date will be represented as 2 characters. “ #” or “##”

 

Testing:

Get the html source from the following web pages to test your program.

http://www.harding.edu/USER/dsteil/WWW/345/345_CALENDAR_TT.HTM

http://www.harding.edu/USER/dsteil/WWW/301/301_Quiz_CALENDAR_MWF.HTM

http://www.harding.edu/USER/dsteil/WWW/301/Notes/301_Notes_CALENDAR_MWF.HTM

 

I will create a new web page to test your submitted programs.

 

I am giving you the following syntax just to get you thinking.

 

#include<iostream>

#include<iomanip>

 

using namespace std;

 

void main()

{

char Months[12][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

       int DaysInMonths[12] = {31,  28,    31,    30,    31,    30,    31,    31,    30,    31,    30,    31};

 

       for (int Month = 0; Month < 12; Month++)

       {

              for (int Day = 1; Day <= DaysInMonths[Month]; Day++)

              {

                     cout << Months[Month] << setw(3) << Day << endl;

              }

       }

}